#include<bits/stdc++.h>
using namespace std;
int main( )
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    int i,j;
    int e=0;
    int x[n+5];
    for(i=1;i<=n;i++)
    {
        cin>>x[i];
    }
    for(i=1;i<n;i++)
    {
       j=i+1;
       if(x[i]<x[j])x[i]=0;
    }
    for(i=1;i<=n;i++)
    {
        if(x[i]!=0)e=e+1;
    }
    cout<<e;
    return 0;
}
